﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Model.Sys_Controllers>>" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<div class="ui-state-default" style="padding: 0 5px;">
    <h4>
        欢迎您登录系统</h4>
</div>
<div class="basic">
    <%foreach (var item in Model as IQueryable<Model.Sys_Controllers>)
      {%>
    <div style="float: left; width: 15%;">
        <h5 style="text-align: center;">
            <%=Html.Encode(item.DisplayName) %>
        </h5>
        <div>
            <ul>
                <%foreach (var item1 in item.Sys_Controllers1.Where(a => a.Enable && a.Sys_ActionsInControllersInRoles.Any(b => b.Sys_Roles.Sys_UsersInRoles.Any(c => c.Sys_Users.UserName.Equals(User.Identity.Name)))).OrderBy(a => a.IntOrder))
                  {%>
                <li>
                    <%=Ajax.ActionLink(item1.DisplayName, "Index", item1.ControllerName, new AjaxOptions() { LoadingElementId = "Loading", UpdateTargetId = "Main", OnFailure = "dialogOpen" })%></li>
                <%} %>
            </ul>
        </div>
    </div>
    <%} %>
</div>
